#include <my_head.h>

int main(int argc, const char *argv[]){
    struct stat xja;
    if(-1 == stat("hello.txt", &xja))
        ERR_LOG("stat error");
    // 用户名
    struct passwd *p = getpwuid(xja.st_uid);
    if(NULL == p)
        ERR_LOG("getpwuid error");
    printf("%s\n", p->pw_name);
    // 组名
    struct group *q = getgrgid(xja.st_gid);
    if(NULL == q)
        ERR_LOG("getgrgid error");
    printf("%s\n", q->gr_name);

    return 0;
}